import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;

/**
 * @author zhangdi
 * @version 1.0
 * @date 2022.3.15 11:06
 */
public class ReetranLockDemo2 {
    public static void main(String[] args) {
//        ThreadFactory threadFactory = new ThreadFactory() {
//            @Override
//            public Thread newThread(Runnable r) {
//                Thread thread = new Thread(null, r, "t1", 5);
//                thread.setDaemon(false);
//                return thread;
//            }
//        };
//        ScheduledExecutorService service = Executors.newScheduledThreadPool(2, threadFactory);
//        service.scheduleWithFixedDelay(new ReentrantLockDemo.timer0(), 2, 2, TimeUnit.SECONDS);
    }
}
